<ng-container *ngIf="isExternalUrl(); else isLocalUrl">
  <a
    role="link"
    [href]="url"
    [target]="target"
    [class]="class"
    [id]="id"
    [style]="style"
    [title]="title"
  >
    <ng-container *ngTemplateOutlet="templateOutlet"></ng-container>
  </a>
</ng-container>
<ng-template #isLocalUrl>
  <a
    role="link"
    [routerLink]="routerUrl"
    [target]="target"
    [class]="class"
    [id]="id"
    [style]="style"
    [title]="title"
  >
    <ng-container *ngTemplateOutlet="templateOutlet"></ng-container>
  </a>
</ng-template>
<ng-template #templateOutlet> <ng-content></ng-content> </ng-template>
